package com.ruoyi.hospital.service;

import com.ruoyi.hospital.domain.Hospital;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 医院管理 Service 接口
 */
public interface IHospitalService {

    Hospital selectHospitalById(Long id);
    List<Hospital> selectHospitalByIds(List<Long> ids);
    List<Hospital> selectHospitalList(Hospital hospital);

    @Transactional(rollbackFor = Exception.class)
    int insertHospital(Hospital hospital);

    @Transactional(rollbackFor = Exception.class)
    int updateHospital(Hospital hospital);

    @Transactional(rollbackFor = Exception.class)
    int deleteHospitalById(Long id);

    @Transactional(rollbackFor = Exception.class)
    int deleteHospitalByIds(Long[] ids);
    /**
     * 查询附近医院（原方法，无分页）
     */
// IHospitalService.java
    List<Hospital> selectNearbyHospitals(double longitude, double latitude, double radius, int pageNum, int pageSize);

    /**
     * 查询附近医院（分页）
     */

    @Transactional(rollbackFor = Exception.class)
    int batchUpdateCoordinates(List<Hospital> hospitals);
}
